﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using Utility;
using System.Data.SqlClient;
namespace Service
{
    public class UpLoadResultLogService
    {
        public int Add(UploadResultLog log)
        {
            string sql = "insert into UploadResultLog values(@LogSchoolCode,@LogSchoolName,@LogTime,@LogFileUpLoadTime,@LogResult,@LogType,@LogError)";
            SqlParameter[] sp = new SqlParameter[]{
                new SqlParameter("@LogSchoolCode",log.LogSchoolCode),
                new SqlParameter("@LogSchoolName",log.LogSchoolName),
                new SqlParameter("@LogTime",log.LogTime),
                new SqlParameter("@LogFileUpLoadTime",log.LogFileUpLoadTime),
                new SqlParameter("@LogResult",log.LogResult),
                new SqlParameter("@LogType",log.LogType),
                new SqlParameter("@LogError",log.LogError),
            };
            return SqlHelper.ExecuteNonQuery(Utility.WebConn.connString, System.Data.CommandType.Text, sql, sp);
        }
    }
}
